/*
 * FileOperations.h
 *
 *  Created on: Apr 3, 2010
 *      Author: Lukasz Spintzyk
 */

#ifndef FILEOPERATIONS_H_
#define FILEOPERATIONS_H_

#ifndef PH_H_
#include "ph.h"
#endif

#include "File.h"

class File;

namespace CudaCryptoFs
{

int open(const char *path, struct fuse_file_info *fi);

int read(const char *path, char *buf, size_t size, off_t offset,
                     struct fuse_file_info *fi);

int unlink(const char *);

int truncate(const char *, off_t);

int write(const char *, const char *, size_t, off_t,struct fuse_file_info *);

int flush(const char *, struct fuse_file_info *);

int release(const char *, struct fuse_file_info *);

int fsync(const char *, int, struct fuse_file_info *);

int create(const char *, mode_t, struct fuse_file_info *);

int ftruncate(const char *, off_t, struct fuse_file_info *);

int fgetattr(const char *, struct stat *, struct fuse_file_info *);


FilePtr get_file(const char* path, uint64_t fh);

}

#endif /* FILEOPERATIONS_H_ */
